<div class="ui basic segment">
  <h1 class="ui dividing header">
    Topics
    <div class="sub header">Create with care (<%= @topics |> length |> SharedHelpers.comma_separated %>)</div>
  </h1>

  <div class="actions">
    <%= link to: Routes.admin_topic_path(@conn, :new), class: "ui right floated primary basic button" do %>
      <i class="add layout icon"></i>
      Add Topic
    <% end %>
  </div>
</div>

<div class="ui basic segment">
<%= if Enum.any?(@topics) do %>
  <%= render "_table.html", conn: @conn, topics: @topics %>
<% end %>
</div>
